import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsUUID } from 'class-validator';
import { IAssignRoles } from '@nbase/shared';

/**
 * 分配角色 DTO
 * 为用户分配角色
 */
export class AssignRolesDto implements IAssignRoles {
  @ApiProperty({
    description: '角色ID列表',
    example: ['uuid-1', 'uuid-2'],
    type: [String],
  })
  @IsArray()
  @IsUUID('all', { each: true })
  roleIds!: string[];
}

